<%@ page import="database.MySQLUtils" %>
<%@ page import="java.sql.ResultSet" %><%--
  Created by IntelliJ IDEA.
  User: yfuxzpskbr
  Date: 2021/5/3
  Time: 22:30
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>京东-欢迎登录</title>
    <link rel="icon" type="image/x-icon" href="res/favicon.ico"/>
    <link rel="stylesheet" href="./login.css?v=<%=System.currentTimeMillis()%>">
    <script src="./login.js"></script>
    <script>
        function hand() {
            if (httpRequest.readyState == 4) {
                var info = httpRequest.responseText;
                if (info == "用户名不存在") {
                    document.getElementsByClassName("info1")[0].innerHTML = "用户名不存在";
                    document.getElementsByClassName("info1")[0].style = "display:block";
                } else if (info == "密码错误") {
                    document.getElementsByClassName("info2")[0].innerHTML = "密码错误";
                    document.getElementsByClassName("info2")[0].style = "display:block";
                }else if(info=="登录成功"){
                    location.href="main.jsp?username="+encodeURI(document.getElementById("user").value);
                }
            }
        }
    </script>
</head>
<body>
<%
    request.setCharacterEncoding("UTF-8");
    response.setContentType("text/html;charset=UTF-8");
%>
<div class="header">
    <div class="img">
        欢迎登录
    </div>
    <div class="tologin">
        <a href="#">登录页面,调查问卷</a>
    </div>
</div>
<div class="body">
    <div class="box">
        <div class="warning">
            京东不会以任何理由要求您转账汇款，谨防诈骗。
        </div>
        <div class="f2">
            <button onclick="select()" id="b1">
                扫码登录
            </button>
            <button onclick="select()" id="b2" style="color: #e4393c;font-weight: 700;">
                账户登录
            </button>
        </div>
        <div class="f3_1">
            <img src="./res/erweima.png" style="position: absolute;top: 40px;left: 106px;">
            <div class="open">打开<a style="color: #e4393c;">手机京东</a> 扫描二维码</div>
            <div class="santu">
                <span style="background-image: url(./res/mianshuru.png);">免输入</span>
                <span style="background-image: url(./res/gengkuai.png);">更快</span>
                <span style="background-image: url(./res/genganquan.png);">更安全</span>
            </div>
        </div>
        <div class="f3_2 sele">
            <div>
                <div><input type="text" placeholder="手机号" id="user"
                            style="background-image: url(./res/user.png);margin-bottom: 30px;"></div>
                <div><input type="password" placeholder="请输入密码" id="pwd"
                            style="background-image: url(./res/pwd.png);"></div>
            </div>
            <a>忘记密码</a>
            <button onclick="login()">登录</button>
        </div>
        <div class="info1">用户名不存在</div>
        <div class="info2">密码错误</div>
        <div class="f4">
            <div class="left">
                <span style="background-image: url(./res/qq.png);"><a>QQ</a></span>
                <span style="background-image: url(./res/weixin.png);"><a>微信</a></span>
            </div>
            <div class="right">
                <a href="register_step1.jsp">立即注册</a>
            </div>
        </div>
    </div>
</div>
<div class="footer">
    <div class="ftext">
        <ul>
            <li><a href="#" style="border: none;">关于我们</a></li>
            <li><a href="#">联系我们</a></li>
            <li><a href="#">人才招聘</a></li>
            <li><a href="#">商家入驻</a></li>
            <li><a href="#">广告服务</a></li>
            <li><a href="#">手机京东</a></li>
            <li><a href="#">友情链接</a></li>
            <li><a href="#">销售联盟</a></li>
            <li><a href="#">京东社区</a></li>
            <li><a href="#">京东公益</a></li>
            <li><a href="#">English Site</a></li>
        </ul>
        <br>
        <span style="font-size:12px;color:#999;margin-left:400px;">Copyright©2004-2021  京东JD.com 版权所有</span>
    </div>
</div>
</body>
</html>
